package top.kaoshanji.q1ch07a;

import top.kaoshanji.y1constant.FileConstant;

import java.io.*;

/**
 * 代码清单-q1ch07a-330页b：基本的文件输出
 * author kaoshanji
 * ^_^
 * create time 2025/3/12 15:53
 */
public class BasicFileOutput {

    static String pathStr = FileConstant.LOCAL_ROOT_PATH.concat("q1ch07a330页b\\");
    static String file = pathStr.concat("BasicFileOutput.dat");

    public static void main(String[] args) {

        try (BufferedReader in = new BufferedReader(new StringReader(BufferedInputFile.read(pathStr.concat("BasicFileOutput.java"))));
             PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file)))){

            in.lines().forEach(out::println);

        } catch (IOException e) {
            throw new RuntimeException(e);
        }


    }



}
